package com.mall.book.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mall.book.entity.po.BookInfo;
import com.mall.book.mappers.BookInfoMapper;
import com.mall.book.service.BookInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

/**
 * Created by Dizziness on 2022/3/22 15:12
 */
@Service
public class BookInfoServiceImpl implements BookInfoService {
    @Autowired
    BookInfoMapper bookInfoMapper;

    @Override
    public Collection<String> getAllIds() {
        return bookInfoMapper.selectAllIds();
    }

    @Override
    public Collection<String> getDetailPictureById(String id) {
        return bookInfoMapper.getPictureByBookId(id);
    }

    @Override
    public List<BookInfo> getByMap(HashMap<String, Object> queryMap) {
        return bookInfoMapper.selectByMap(queryMap);
    }

    @Override
    public List<BookInfo> getAll() {
        return bookInfoMapper.getAll();
    }

    /*以下为借口方法*/
    @Override
    public boolean saveBatch(Collection<BookInfo> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean saveOrUpdateBatch(Collection<BookInfo> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean updateBatchById(Collection<BookInfo> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean saveOrUpdate(BookInfo entity) {
        return false;
    }

    @Override
    public BookInfo getOne(Wrapper<BookInfo> queryWrapper, boolean throwEx) {
        return null;
    }

    @Override
    public Map<String, Object> getMap(Wrapper<BookInfo> queryWrapper) {
        return null;
    }

    @Override
    public <V> V getObj(Wrapper<BookInfo> queryWrapper, Function<? super Object, V> mapper) {
        return null;
    }

    @Override
    public BaseMapper<BookInfo> getBaseMapper() {
        return bookInfoMapper;
    }

    @Override
    public Class<BookInfo> getEntityClass() {
        return BookInfo.class;
    }


}
